﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage
{
    public class QueryPlcWriteDbInfoDto : PageResultDto
    {
        public string EquipmentCode { get; set; }
        public string ObjectType { get; set; }
        public int? DbCode { get; set; }
        /// <summary>
        /// plc连接关联Id
        /// </summary>
        public long? PlcConnectionId { get; set; }
    }

    public class PlcWriteDbInfoDto: PageResultDto
    {
        public long ID { get; set; }

        public string Js_Id { get { return ID.ToString(); } }
        public string EquipmentCode { get; set; }
        public string ObjectType { get; set; }
        public long PlcConnectionId { get; set; }
        public int DbCode { get; set; }
        public int DbStart { get; set; }
        /// <summary>
        /// plc ip
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string PlcConnectionIP { get; set; }
        /// <summary>
        /// plc cpu
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string PlcCpuType { get; set; }

        [Required(AllowEmptyStrings = true)]
        public string PlcCpuTypeName { get; set; }
    }

    public class PlcWriteDbDto
    {
        public string EquipmentCode { get; set; }

        public int WcsDbCode { get; set; }
        public int WcsDbStart { get; set; }

        public int PlcDbCode { get; set; }
        public int PlcDbStart { get; set; }

        public long PlcConnectionId { get; set; }
        public string IP { get; set; }
        public string PlcCpuType { get; set; }
        public short Rack { get; set; }
        public short Slot { get; set; }
        public bool IsSc { get; set; }
    }
}
